﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

/// <summary>
/// Created By : Nguyen Dinh Tuong Uyen
/// Created Date : 02/21/2012
/// Description : Includes helpful methods 
/// </summary>

namespace Common
{
    public class CommonHelper
    {
        /// <summary>
        /// Create a random number
        /// </summary>
        /// <param name="oSize">The size of rerurn number</param>
        /// <returns></returns>
        public static string RanNum(object oSize)
        {
            int size = Convert.ToInt32(oSize);
            string str = "0123456789";
            string strResult = "";
            Random r = new Random();
            for (int i = 0; i < size; i++)
            {
                strResult += str.Substring(r.Next(0, str.Length - 2), 1);
            }
            return strResult;
        }
    }
}
